Set bad error codes to negative. tnx jweyrich!