fixed an infinite loop when zooming out