Make path building more robust.