Clean of a few errors in saving the app state.