Fix #364 Threadsafe problem with Kryo