Fix null group bug