Fix error that makes Lua stack unbalanced.