Slightly improved zoom code