Some bugs fixed, although redundant hypotheses are still not handled correctly.