FIG. 5A illustrates a cross section view of an ultrasonic fingerprint sensor 500, according to an embodiment. As illustrated, ultrasonic fingerprint sensor 500 includes several different layers. Ultrasonic fingerprint sensor 500 includes an active sensing layer 520 on top of a substrate 510. The active sensing layer 520 may use various techniques to sense or detect the fingerprint, e.g., acoustic or ultrasonic techniques. It should be appreciated that active sensing layer 520 may not extend to the edges of contact layer 530. For an ultrasonic fingerprint sensor, the sensing layer may comprise an array of ultrasonic transducers (e.g., PMUTs 100 of FIG. 1A, PMUTs 100′ of FIG. 1B, or bulk piezo actuator elements) that may be used emit and detect ultrasonic waves. Contact layer 530 overlays sensing layer 520, where the outer surface of contact layer 530 is contact surface 540. Contact surface 540 of contact layer 530 is rounded at edge regions (as indicated by box 535), and is substantially flat and parallel to sensing layer in the interior region. For example, a user using ultrasonic fingerprint sensor 500 places his or her finger in contact with contact surface 540.