On the inside of the latch, there is a sprung lever that catches on the detents, there are two detents, one for when the door is fully shut and one is the safety detent.
With mine, the lever was full of old, dried grease, therefore was fairly stiff, and the spring could not return it all the way, so it wasnt quite catching on the last detent.
I was nearly ready to replace the door seal thinking it was the rubbers at fault, because i could slam the door real hard and it would catch, but then it started coming open to the 2nd detent while driving, which prompted me to check the latch.
Not saying it is the problem with yours, but give it a check, might be worth taking the latches off and cleaning them up if they are fairly old, it makes a lot of difference on how easy they operate when they are cleaned up. Use carby cleaner to get all the crap off them and silicon or lanoline spray to lubricate them.