Fixed attribute scope issues