Fix flowState creation