Found a temporary solution to the problem. I noticed that the trans goes to limp mode downshifting from 2nd to 1st geat or 3rd to 2nd gear and when the rpm hits 1000. I basically adjusted the idling to between 1500 and 2000 rpm
so when I apply the brakes or when it downshifts the idling
will be above 1000 rpm. For now this temporary fix works for me.