Fixes bugs with annotations and panning.