potential fix for exception on shutdown.
Fix for brpeanut/OpenMario#1