Corrected handling of paths