How can I stop my cockatiel biting?

 
How can I stop my cockatiel biting?
My cockatiel is actually really tame and a nice friendly bird. He calls for me when I leave the room too. Sometimes he'll even enjoy a head scratch from me. The only thing is that when I pet him on the back sometimes or even when he is just sitting on my finger he will start nibbling at my fingers but then he'll bite hard that it leaves marks and it really hard and he doesn't hiss or anything and he doesn't look aggressive but it does really hurt. Do you think he doesn't realize it? Why do you think he is doing this because he does bite pretty hard. How can i stop him from doing this?
Stop touching him where he doesn't want to be touched. Birds like to be scratched in places they can't reach with their beak ie, under the beak, behind the ears, on top of their head and sometmes under their wng but only if they'll let you. If your bird is biting at you when you scratch his back, then DON'T DO THAT! He's telling you something and if you ignore him you'll only fuel the fire and annoy the bird. I've found that especially cockatiels, while loving attention are very particular as to how and where they'l let themselves be touched.
12 guage birdshot available at your local wallmart