Bug fix when dismissing the mail form