fixing up the wander - obstacle -avoid - coordinate problem