Fixed hashCode() method