fix bugs in flow rename.