fix tag scoping