Changed latching/clocking routine.