Listbox bug fixes and utility functions.