Fix issue in line mode