fix return bytecode generation