fix some bugs which caused delays in the tbs server