Fixed a few bugs in the msgpack serializer