strange behaviour idle

Hi there!
My 1991 Micra K10 1,2 Litre with Automatic Transmision shows some strage behaviour.
When stopping in mode "D" (e.g. at a traffic light) the engine stutters and turns off while pushing the brakes.
When I shift to "N" instead, everything is fine.
I can't find a link between idle and automatic transmission.
Any adjustments possible? Where?
Bug found! Blocked ventilation membrane in gas tank cap.
With running engine no problem, when idling only, too little suction.
Toothpick and WD40 make it work again. Put on some silicone spray to make the rubber smooth again. Thx.