Fix algorithm zoomFrames