fixing bug with ERROR_REPORTING directive