some fixes in flow