remove spurious paths