Fixed incorrect call to Process.wait by changing the call to Process.waitall.