Dry storage box in rear of bike opens at times ?

I was riding over the weekend and got into some water with my new 2016 850xmr with the storage under the rear rack between the tail lights. I did a water wheeling and some how the storage box must have opened dumping all my shit out , good thing I had taken the phones out of there , but my tool bag slid out after 4 days of going back in waist high water with a huge pole magnet I found it . Just wondering has anyone else had this issue or is there a fix or some way to prevent this . And I’m 95% positive it was closed all the way before I went in the water