additional fix for the second program stuck bug