Fix SegFault in listbox