redraw bug fix