sigh...
first off, how can you expect us to help if we can't see what you actually did?? we are just stabbing in the dark.
now, unconnected inputs are floating. while you might think they are going to be random, they may well follow what nearby signals are doing thus appearing not so random. clydes point is also valid, with out pull ups on inputs, they may float and thus be random. so, until you tie down or up all the inputs, you can never be sure. sorry but that's just sloppy workmanship.