Fix to remove spaces in GROUP if the element exists