fixes issue with $paths not found, and returns orignal path if no paths