Fixed email bugs.