Fixing attribute name typo

Also adding a test case