fixed small bugs in email redirect