fixed endless loop in video index creation