fixing issues with path construction with ids