fix a scoping issue