fix rwlock bug