Fix path resources extraction

Handle case of no path element in Resources.