fix a scoping error