Fixed an bug in error_response