fixed a possible bug in nmode_state.compute_3mode_eq