Fix hash for type