Correct. You could acually do some slow flips moving house to house every 2-3 years and never pay tax on the gains. As soon as I learned about this personal residence exemption 12-15 years ago this was my million dollar idea. Never panned out. Oh well.
Even if you move before you sell it, as long as you sell the house within the next 3 years, you will be exempt from taxable gains of up to $500K assuming you are filing a joint return.