fix ids so it can works fine with subfolders