fixed faulty hashcode implementation