fix panic with rwlock
Merge pull request #1 from Runnable/panic

fix panic with rwlock