Fixed math errors in calculating the number of nodes in a graph. Additionally added a hack to prevent groupnames with ' not to error out and bypass validation