fixes error when changing code file in play mode caused the canvas to get unloaded