Fixed bug when accessing mails