fixed an import bug and also the unit select race condition