autoSave missing in set function, and switched to an or conditional assignment over turnary