Fixed a bug in mmsb scrip