Better handling of hashes