We Will go with a new box to mount, for example, a new latch for a gate which will not be zaedat in rainy weather. Pick up a bolt in length about 80-90 mm (it is a thickness bruska gates together with a latch), two nuts with washers to a bolt, and also short pruzhinku which internal diameter hardly is more than diameter of a bolt. .
Your latch rotated on the big nail. Instead of it insert a bolt, put between two washers pruzhinku, put on a latch and fix its nut. Now a latch will not be zaedat when the gate and a latch will strongly become wet in the rain.