fixed bug with lua