Bug fix for mean square evaluation for each mode