fix off-by-one in initHeaderMessage()