Migrate nodes from Long[] to long[] to save memory