Fix for scoping