fix bug on direct integration of the line