Leaks around windshield gasket

I needed to replace the box itself because the door was missing. When I pulled out the old one I noticed the foam seal was rotted so I inspected the "new" used one, and it's seal was in about the same shape so I scraped the rotten foam material off and put a BIG bead of black windshield sealant in it's place and then installed the box. Check your gasket and if it's rotten replace it with sealant.