fixed errors related to serilization of objects, and object ids.