fix typo
improve _waitfor processes management