Fix groups() method