Fixed bug in route discovery with error