bug fix in error codes