fix problem, when last group is missing