fixed bug in turning split-up algorithm causing nils to appear in the path