Fix bug in path6 that could cause tool to get stuck