State should also be saved if there is a problem in the onBeforeSave