fixed bug due to changing attr-map to ref