2002 C240 auto

Car either stall on stopping or pulls off erratically, could this be a faulty Sam?Once driving runs normally,no other problem.