Proper handling of select images dialog.