Fix error when receiving an error