Fixed a bug & added a test with struct keys