Hide the duplicate message when the form hides

Fixes #84