Tidy up error state handling