add mutex, lua multi-thread synchronization to be fixed