fix mailstatus not being properly updated