fix for paths with embedded rootpath