Reimplemented save on quit