Return error codes properly.