checked index bounds when clearing thread images