Changed if dom search returns 1 dom change array to dom