WSOTWO-126: fixed bugs related to serialization, deserialization of elements