fix error when there is no group