Solved the problem with lines which different direction.