Let's not assume anything. Do the files play correctly from you hard drive or not? You still don't say which program you are using to convert. If you are downloading these avi's from torrents then you get what you pay for, the people who upload are under no obligation to guarantee the files to be error free.
As for software that can 'fix' avi files, there are several that claim they can. Just google for "repair avi file" or anything similar. I can't recommend one.