Fixing focus when redrawing