lua threading issue in process