Resolve issue with canvas not redrawing