fix portExists for flow