Fixed: Save and restore last stated after reset

It has now been tested and confirmed working!