Fixes scoping error