fixed the bug that was breaking the canvas redraw state