fixed bug in getting active tab from current (focused) window