occasional small fixes to lua