fix indeterminate serialization order of dict keys