fixed bug with the target tab not existing