If you compress the cap just a very little, it will fit really tight. But since there is no pressure pushing it off, it stays put. I made it so that I can remove it if I have a problem with the circuitry. It is still totally sealed on the inside top, and on the bottom, right under the switch so I would short anything with liquid.