Add check if old input is an array and grab the first value before passing it as an attribute.