Fixed bugs due to missing hashCode/equals methods