fixed bugs in LA solver