Fix crash in select object dialog