Improve path collision detetction.