fix index bug in mmsegrule.c