Updated some lua functions
Updated lua functions