Fixed bugs in assertion and LogicTest