Fix the bug of generateMultiPath