fixed process wait problems, removed printfs