fix bugs and support TB/TV properly