fixed bug in tbs state saving