Fix NaN and zoom bugs.