Fix __hash__ method.