fix bug for negative hashcode