fix a failure handling