Fixup lua

This fixes up some loose ends from pull request #330