You must be in the mood for you flu shot.

Being in a good mood for your flu shot can boost how well it works, according to a study released this week in the journal Brain, Behavior and Immunity.

The researchers measured the moods — both negative and positive — of 138 adult participants, as well as their levels of physical activity, diet and sleep over a six week period, including on the day of the flu shot. To figure out how well the shot was working, they measured the amount of the influenza antibody — this is what stays in your body after a flu shot to protect you from the flu — left in the bloodstream four and 16 weeks after the shot.

The result: “Of all of the factors measured, only positive mood over the 6 week observational period predicted how well the jab worked – with good mood associated with higher levels of antibody,” the study found. What’s more, mood on the day of the vaccination may be particularly important, as that led to between 8 and 14% higher antibody levels after the flu shot.

Also see: Why you should never drink coffee at the office

Of course, this doesn’t mean a big smile will always protect you from the flu. The study measured the levels of flu antibodies in your blood, not actual flu cases. And if this year’s flu shot doesn’t protect against the big strain of flu that afflicts us this year, the antibodies may not even be all that effective. (The study notes that flu vaccinations are “estimated to only be effective in 17-53% of older adults compared to 70-90% of younger people.”).

Still, it may be worth trying to get yourself in a good mood before your flu shot, as you may not only ward off the illness, but also save yourself some money. The University of Utah estimates that “illness from the flu costs the average person about $130 between visiting the doctor and purchasing medicine.” And it may cost those without paid sick days — roughly one in three workers in the private sector — even more when lost wages are factored in.