Make LapSolver so that it does not fall into infinite loop due to numeric errors. However this makes results a bit less precise.