numerous output fixes