Fix scope of attribute