jessabu:
The wheels aren't powered by just USB, I connected a 9V battery to the power rails.
O.k. so what you mean is that the schematic you said you had followed isn't what you have at all. So it was a waste of time looking at that. You're not exactly making it easy to help you. Are you actually even using a UNO?
Let's have an accurate diagram of how everything is connected with emphasis on all power/battery connections.
BTW if the 9V battery is one of those small PP3 types then it really won't help. They can't deliver enough current to run motors.
Steve