Bug fix in shortest time path