fix some resource bugs
fix bootstrapping opcode
add nil script test