fix flow and flow template