fixed the issue with bulk messages for fetching more than thousand mails.