Gate refinement for improved flow results