fix bug for heartbeat frame construction