Fixed some bad email logic