Fix a nasty bug when the application is closed
Fix a nasty bug when the application is closed

Destroy for this doesn't actually do anything, so this causes our
scripts not to be saved if they're not reset.

Thonik/rainback