Fixed crash when closing mod selection dialog.