fixed redraw bug