Fix incorrect attribute setting