fix bug with polarization dipole output, other misc.