Lua fixes

These were found during wiki creation.  I will continue to add fixes in coming days if I find any more.  Therefore I recommend keeping this pull open until I am done.