Fix assign_attributes