avoid hanging process