Update decode; fix interpretation of payload length