Bug fixing on Serialization