Fixed bug when a group name contained spaces.