Did you ever think of a problem for your players, and they came up with a solution you would never have thought of? One that blew away your well prepared evils in a whoosh, and struck you right off balance? How did that feel?
Sometimes your players are damn (excusez-le-mot) well smarter than you. And you have to face it. The worst thing you can do then is to say their plan won't work. It will stifle their creativity, their sense of accomplishment, and their motivation to play with you. You don't want to do that.
So what do you do?
You have a couple of choices when your players are smarter. The first is to just act as if your nose bleeds, and let their plan work. It's a smart plan, isn't it? So let it work. Then think on your toes what happens next. Don't be tempted to undo the players' moment of triumph straight away, but instead show how effective their plan was. Describe the effects of the success lavishly. The players will enjoy it, and it will give you time to think about the next challenge to throw at your players.
The second option is to also be honest about it. Just say “wow, you really caught me off guard there!”, and compliment them on their plan. Maybe give them five or ten minutes of a break. For them to grab some pretzels, and for you to get your notes and wits together and make a new plan.
The third is to actually rejoice. Your players are smarter! That doesn't mean they wrecked your careful plans and think your game is worthless. They wrecked your plans alright, but they are also so well into the game that they manage to cook up a terrific counter-plan of their own. You did well. You are no longer alone in shaping the story, your players are actively shaping it in ways you had not foreseen!
Of course, you can also do all three of the above. In any case – let the plan of the heroes work, and go with the flow!