Fix empty groups error