Fixing bug with exiting child processes where exit status wasn't correctly set.