fixed error of error_code attribute