fix to scope error