fixing obstacle avoidence