Update rti.py

included bug fix from mrwessel