Added clean handling for invalid opcodes.