Add missing end from lua