Correctly initialize payload length of encrypted payload