bug fix (don't save paths that are shorter than requested length)