Add test for scope fix