payload length retrieval bug fixed.