Fixed exception with KryoSerializableStreamCodec #559