fix line end filter for sql