fix bugs in LP solver. #2