rwlock for vcache
small fixes
merged in rwlock branch