fix payloads > 126 and add test