Fixed NPE in Arrays.copyOf().