fixed some bugs in the sqimap_mailbox_close() function