Most atomic force microscopes employ the optical lever deflection method using a quadrant photodetector as the displacement sensor of the cantilever, which enables it to detect lateral force (or friction force) as well as normal force. Misalignment between the cantilever direction and the photodetector direction causes cross talk between the lateral force signal and normal force signal. We analyze systematically the type of cross talk, and then propose a compensation method by using a two-dimensional rotary stage.