Fixed bug to refresh canvas on resubmit