fixing a typo and adding a test to see if nested attributes are initiali...

...sed