Fixed some bugs related to zooming