Recently when I was revising a novella, I wrote in a scene and even as I wrote it I knew it sucked-the-hairy-wazoo. Dumb, stupid, and unrealistic. Unfortunately I wanted to make a printout for editing purposes and for my wife to proofread, so I just warned her that there was one really awful scene and she'd know it when she saw it. "Only one?" Yeah, well... (grin)
The Harrison Ford Solution
You want your protag to be heroic, or at least competent, but in my case we're dealing with a junior officer on a large interstellar warship -- isn't it natural to want them to save the day? Except... running across a large cargo bay and shooting precision shots all of sudden when you haven't shown that aptitude before, just doesn't seem very realistic. Not when the ship has large armored Marine guards with autotargeting weapons mounts looking for something to do before dinner... Junior officers can only get into trouble and run over if they aren't careful. The Academy'll always graduate some more ensigns.
Sometimes you need to do an Indiana Jones when the bad guy starts whipping around his big curved sword... and just shoot him.
Sometimes you just don't know when to quit.