Fixes a bug in how large payload sizes were encoded.