altered sem func in mstats to match stats

Fixes #3086