fix some resource bugs
fix bootstrapping opcode