finally solved annoying bug in exact solver.java