fix parsing of next group