Fix window settings not saving on exit.

Regression due to commit 63c83e9 on Oct 27, 2013.