Fix setattribute to setattr, also fix typo