Fixed functions order to prevent of sorting possibly repeated paths