Fix bug on freeing docking point after smart path calculation.