fixed a scope error