fix for scope error