Fix hma's monitoring logic.