Bugfixes and tweaks to obstacle avoidance.