fix redraw bug