add termination \0 byte in HMPair key and value