fixing bug with generating email list