What kind of a "nasty smell?"
Some yeasts give off sulphur and other chemicals during the fermentation process, and are quite normal, and go away. Fermentation is an ugly and stinky business.
There are other smells like nail polish remover smell, which indeed are a problem.
The biggest thing to do, is just relax, see the process through, and THEN you'll know if it's a normal byproduct of fermentation, or a problem. You really can't tell when you're sniffing your airlock. Yo have to wait to the beer is finished to see.
You can't "do" anything if there is a problem, anyway....so you have to wait it out. 99.9% of the time, everything is fine.