fixed serialization of objects.  still some slight issues.