Polaris sportsman engine chain slipping!

I was riding in the creek on my 2009 Polaris sportsman 300 and I hit the corner of a rock and it jolted the atv side ways into the water and the snorkels went under but only for about 30 seconds… When I tipped it back up i tried to start it and the chain was off the cam shaft… I know it was and still is because it happened before.. But the chain does not just fall off like that… Please help me find a way to prevent this or fix it please!