Fixed bugs with wrong simplify conditions