Hopefully fixed error state when encountering errors