fixing email bug