Fixed iterating over hashes