fixed bugs for SMT solver