fixed errors with email parameters