Fixed small bug that should be a local variable