Put it on a diagnostic tool and operate the throttle in the actuations menu. Do the same with the idle control valve. Ensure both are working properly. Then reset the adaptions and see if it improves.
I'm assuming the throttle body and the idle valve have been properly cleaned out, all vacuum pipes and engine breather pipes are good and that there are no fault codes stored in the engine ECU memory using a proper diagnostic tool and not an OBD reader.