minor changes to prevent map repaint flickering (see #384)