Fix size calcs of heartbeat length

I think the calculation of payload length is wrong