fixed compilation issue and serialization issue