fix single value serialization
merge matt's work