fix redirect and email