fix bug, mail sent twice