Fixed the scheduler bug where it would hang. Just moved the numberOfFlows decrement inside the scheduler code instead of inside the flow code.