Frigidaire washer door will not lock

My front loader washer door will not lock properly. It will lock occasionally but not everytime, so I replaced the door lock assembly thinking it was going bad. I have installed the new part but it still is not locking properly. Any suggestions?

You might have to replace the door latch also, I remember they re-designed the old door lock assembly
Also, you might have something intermittant in the door lock circuit. There is a test for this in the service packet behind the front panel.