Fixes scoping issue