Fixed errors in path finder