Fixed bug where finishing the last level would crash the game