Adding a logicOp test case + fixing bugs