Fix redraw bug