added ground connection on comparator inverter