fix line exists method