Fix scoping