bugfix and improvements in tbm control