fixed minor scoping issue