Changed some bugs in the Ambiguity REsolver.