This paper presents a feedback scheme that simultaneously corrects, in real time, for the imaging artifacts caused by cantilever and photosensor misalignments as well as misinterpretations in relative lateral position of the tip with respect to the sample due to the tip-sample stick in atomic force microscopy (AFM). The optical beam bounce method, typically used in AFM for imaging, is sensitive to inaccuracies of cantilever geometry and the relative misalignment of the laser source, cantilever, and the laser sensitive diode from the intended design. These inaccuracies, which contribute to the geometrical cross-talk between the normal and the lateral signals, become prominent at the atomic and subnanometer scales, and thereby impede high resolution imaging studies. The feedback scheme accounts for these artifacts and makes imaging insensitive to, in fact, practically independent of these inaccuracies. This scheme counteracts the lateral twisting dynamics of the cantilever, and as a result, it avoids the misinterpretation problem of the relative lateral position of the cantilever tip from the sample and thereby avoids the corresponding imaging artifacts that are typically prominent in contact mode friction force microscopy (FFM). The feedback scheme consists of simultaneously regulating the normal as well as the lateral cantilever deflection signal at their respective set points. This not only removes the imaging artifacts due to geometrical misalignments, mechanical cross-talk, and irregular sliding but also the corresponding compensatory control signal gives a more accurate real time measure of the lateral interaction force between the sample and the cantilever as compared to the lateral deflection signal used in FFM. Experimental results show significant improvement, and in some cases, practical elimination of the artifacts. The design and implementation of a split piezoassembly needed for the lateral actuation for the feedback scheme are also presented.