Fixed bug with missing last segment of path elements.