Improve and fix bugs for CalculateCommMemes