fixed email bug issues