Improved group check.