Check for out of index lines correctly