fix registration mail delivery bug