fixed redraw issue