fixed a bug in the non-jit lua code