Fix array changes being reset and num for params