Removed some unnecessary recursive locking
Reverted to old r/w lock due to bugs