Fix error saving