solve the NotSerializableException problem