convert from ref count to persistent handles