Fix scoping error