Zoom algorithm fixed