fixed the bug in line above or below other line