Fix some bugs.

[Bug] The editor ignores the level chosen in the menu.
[Bug] Retrying the level after gameplay causes a crash.