some fixes to tbs server stability