Fix hashCode function