[0.3] Fix a bug in HMIMap

Same as, but for the 0.3.x branch.