listdialog: Fixes some bugs