Made swapping more predictable (flushes before each new swap)