fixed ref count indexing for COW
ok, this shoould work