Fixes issue where the wrong line gets highlighted