A method for controlling a scanning probe microscope having a probe with a tip for interacting with a sample, and a nanoscanner for retaining said sample or said probe, comprising the steps of: - monitoring the extension of said nanoscanner along a first direction, along which said tip is moved towards said sample, and - adjusting a level of said probe along said first direction by means of an additional actuator, when said nanoscanner exhibits an extension below or above a threshold value, characterized in that the method further comprises: a) measuring a force curve on said sample, wherein said force curve comprises an approaching curve and a retracting curve, b) detecting an optimal baseline part of said force curve, wherein the optimal baseline part is the part of the force curve, wherein substantially no deflection is measured with increasing actuator displacement, c) detecting a contact point of said force curve, wherein the contact point refers to the actuator displacement, where said tip of said probe is contacting the sample, d) comparing said approaching curve and/or said retracting curve with said optimal baseline part, particularly in proximity of said contact point, e) adjusting one of: • said level of said probe, • the lateral position of said probe, or • a current angle (α), wherein said current angle (α) is monitored between a second direction and the normal of a surface of said sample at a point of said surface, wherein said probe is moving along said second direction towards said point, and said additional actuator and at least a second additional actuator is controlled such that said current angle (α) approaches a predefined desired angle, wherein particularly said desired angle is zero based on the comparison. - monitoring the extension of said nanoscanner along a first direction, along which said tip is moved towards said sample, and - adjusting a level of said probe along said first direction by means of an additional actuator, when said nanoscanner exhibits an extension below or above a threshold value, a) measuring a force curve on said sample, wherein said force curve comprises an approaching curve and a retracting curve, b) detecting an optimal baseline part of said force curve, wherein the optimal baseline part is the part of the force curve, wherein substantially no deflection is measured with increasing actuator displacement, c) detecting a contact point of said force curve, wherein the contact point refers to the actuator displacement, where said tip of said probe is contacting the sample, d) comparing said approaching curve and/or said retracting curve with said optimal baseline part, particularly in proximity of said contact point, e) adjusting one of: • said level of said probe, • the lateral position of said probe, or • a current angle (α), wherein said current angle (α) is monitored between a second direction and the normal of a surface of said sample at a point of said surface, wherein said probe is moving along said second direction towards said point, and said additional actuator and at least a second additional actuator is controlled such that said current angle (α) approaches a predefined desired angle, wherein particularly said desired angle is zero based on the comparison. • said level of said probe, • the lateral position of said probe, or • a current angle (α), wherein said current angle (α) is monitored between a second direction and the normal of a surface of said sample at a point of said surface, wherein said probe is moving along said second direction towards said point, and said additional actuator and at least a second additional actuator is controlled such that said current angle (α) approaches a predefined desired angle, wherein particularly said desired angle is zero