cleanups, fix a nasty bug (popping unexistent thing from lua stack)