more resource handle improvements