Fixed bug when finding path.