The phrase that uses a hyphen incorrectly is perfectly good.
Generally a hyphen is used between two words when they come before a noun they modify and act as a single idea. You can also use them in compound numbers, prefixes (like ex-husband), or to avoid confusion (re-sign vs. resign).