Fixed problems with function solve_linear. Changed binding vec to mx in tests