Fingerprint sensors, in accordance with the described embodiments, are used for capturing fingerprint images that are used for performing fingerprint authentication. As the use of fingerprint sensors proliferates, there is a desire to include fingerprint sensors in devices having varying form factors. In many potential use cases, an ultrasonic fingerprint sensor that is substantially flat is overlaid with a contact layer that is not flat (e.g., has a curved profile, rounded edges, etc.), thus having a varying thickness. This variation in material thickness results in a skewing or redirection of the return signal level (e.g., reflected ultrasonic beam), which can result in artifacts related to contact layer curvature and acoustic wavelength. Moreover, a contact layer having a non-uniform thickness will cause an interference pattern to be generated in a captured image due to the difference in interference between the transmitted and received ultrasonic waves. In some locations, the transmitted and received ultrasonic waves will be in phase, while in other locations the transmitted and received ultrasonic waves will be out of phase, and gradients in between, causing an interference pattern that may obscure the underlying image being captured (e.g., a fingerprint). Embodiments described herein account for the interference pattern caused by the varying thickness of the contact layer.