340 idles at 1500 won't stay running in gear

have you checked to see if the intake bolts are loose?