Solved problem with FlowCount variable in for-loops