Fixing var name and dlm sort order