fix rwlock deadlock