fixed error reporing