Stumbling idle

I have a 2013 Dodge Avenger. The issue I having problems with is a stumbling or rough idle in the morning. Once I back the car out of drive and put in drive it usually stops and I have no issue the rest of the day however days like today the car continues for a few seconds in drive and it throws up engine code P0300 Which is a generic code. Spark plugs changed two years ago coils six months ago. Other than that nothing else had been done thanks