Correcting a bad path calculation