Fixed Groups service to handle chained promises properly.