fix hash function for complex numbers