Fixed crash when quitting a ROM