Fix bug to mailbox query