Fixed lua detection