Bugfix on sm2.test