Minor changes on checkIFFlowExists