fixes for error codes