fix working of red lines