Fix temple of stupidities and the end of the game.

Everything should work now.