Fixed a small bug in the error_reporting