Fix ping decoding (Fixes #969)