Improve lua detection.