bugfix for sort order