fixed some bugs concerning the clock connection if latch is prime