Fix an error in stall check.