Made small change to reduce the chance of a process hanging