New Door Gasket - Door Wont Stay Closed

Needed to replace door gasket (one that goes around the sides, top, & bottom. Appliance Parts Pros website said part number AP3672571 was the gasket (seal) for my machine. Door will not stay closed, hinges & latch is not adjustable. I currently have the door latched shut by a block of wood screwed to the cabinet (my wife is not happy) hoping that the seal will take a set. Any suggestions?