Fix assignment of attributes

This breaks some specs.