fix various places where the Lua stack was reset to 0 and set it to the original stack top instead