Fixed bug in makeGroup