Fixes to lua