Fix bug with 3-byte payloads.