MHAPI code review fix part one