fix freezing when panning outside map bounds