SQ 4.1 bugfixes

Remove extra lines generation
(cherry picked from commit a703b53)