Added nil check on tps for edge cases
Finish hotfix-1