fix bug with multiplying lines