fix permature wait termination