Fixed a bug in msp_helper.