finished up debugging errors on emails