Remove useless initilization for tw and th code

tw and th have been initialized twice, the first time is useless.