changed error status to be correct