Dog biting

I need some help on what to do about my female dog.

We've had her for 6 months now and she's been a great dog but shes had a bad habit of nipping/biting my 4 year old sons.

They do not provoke her, most of the time they come out of their room to go to the kitchen or living room and she runs at them and nips/bites them. It's never really been hard but enough to scare them. They are now scared of her and try to avoid her at all costs.

I had gotten advice before to use a spray bottle, firmly tell her no, get more chew toys and it was kind of working/kind of not.

Well today one of my sons was walking to go sit in the recliner and she ran at him and bit him hard on the leg. Drew blood and left teeth marks.

Is there anything else I can do to correct the biting? I'm desperate. I love my little girl dearly so I don't want to re-home her.