I've tried to make a D flip flop and it works, but when making a simple counter i was trying to conntect ~output to input and it doesn't work as expected. It should oscilate between 0 and 1 on every clock count, but it does it only sometimes. Somehow connecting flip flop to itself makes it goes wierd. Any possible explonation on what am i doing wrong?