Fixed small bug with vector scoping