Automatically save settings after settings panel was closed

Using a hack