fix for error with hashcode and equals