proper redirect and mail fix