Fix saving of plan