handling case of tab moved