fix for element serialization