M-squared bug fix