Sorry to hear about it. in this tight scenario my friend. why did you prefer this old car with a Vitz engine swap? YOu should have to be careful. and who likes to lower rpm? Does it impact anything ina positive sense? looks like the previosu owner is ditching you or he dont know about what he had done with his car. And if you return him back the car, i guess he wont take it back. Khair, jo hua so hua. Lets find a solution.
If its like a sensor issue or not, in both cases. get your car scanned and see you get any code errors or not.
Drain out the current transmission fluid and put in the right fluid, open the chamber, clean it properly from inside. (by doing this, may be you waste your time for chaging fluid but might be it works for you, so think about it before doing it).
Find any good vitz mistry and electrician person to check all the wiring done with the ECU and all other necessary wiring etc. YOu have to do something to trace fault. ANd get the car properly tuned and adjust the rpm.