Add explicit type conversion for number of flows