Fix for bug #42 (Collecions fail to serialize).