Fix sorting error in widget.