Correctly nest hashes