Can you lock the passenger door when it's open and you're pressing the door opening button in and holding it? If so, it is working fine. The driver's side door latch sounds like it's stuffed. I've had similar and the only solution was a replacement latch, though you can try adjusting the linkages and lubricating first.

