Dotted keys bug

Seems to work, all the tests pass!