Fixed scoping error