small fix on canvas redraw