Fixed small bug in wandering