bugfixes for mapi