fix canvas clear before redraw