Fix issue with reporting an error