Added clearing of gem groups