Save state: passes tests & fixes timeout error