Fix the Group checks and get the highest  return code