Fixed attribute setting code