Fix line hits addition and add test of it