Fix a redrawing bug