Corrected waiting for process to stop