fix bug in mgc2spec