misc bytecode-related fixes