add UT for LTR setopton and fix crash issue