Fix the scoping issue