Fix bug of _refCount updating outside the mutex.