fixing joint/obstacle bug