small fixes to hash-consing