avoid a nullpointer bug when the stack is null
Merge branch 'bytecode2' into latest