fixed bugs in implication