Boost INF to max int + additional checks for no path.