upgrade scripts to remove copyOf from redundant places