End loop after finding title