Fix game freeze in dungeon 4 ending sequence (#46).