Fixed newb process_wait not returning anything but -1