Yeah, you have to be consistent when training them. You have to spray them every time they do the behavior, and if you're not going to be around to see them, you have to prevent them from being able to do it (closing off part of the house, etc.). If they think that every single time they go into the kitchen, they get sprayed, they will not go into the kitchen because they hate being sprayed. But if sometimes they get away with it and sometimes they don't, they'll take the gamble.