minor fix in opcode handlers, and add debugger feature