Correcting bad path calculations