fix bug with tabcontrol