fix entry sorting