My dad is a cab driver in NYC..He gets tickets left and right..
One thing he told me that I know works 90% of the time for him is that if there is an error on the ticket (depending on what it is, like name, date, or whatever) the judge may throw it out just b/c the cop is a moron and they have a couple of hundred hearings every day...They don't like their time wasted in court as much as you don't like wasting your time going to court.
Bring the error up to the judge and see if the cops inconfidence counts for anything...I'm gonna give you 75% chance they'll throw it out ....other than that, you weren't doing anything wrong ...and a witness too...cop is just a moron...

...explain the situation to the judge..Dismissed!