Improve line matching for low res gratings