email bug fixes
Merge branch 'working'