Fix bug with no selected groups