I found out what was going wrong. It is incorrect to say that if out degree of any node is greater than 1 there will NOT be a unique topological ordering.
For example consider a grapth with 3 vertices(1, 2, 3) and 3 edges{(1, 2), (2, 3), (1, 3)}. It has a unique topological ordering 1 > 2 > 3.