Fix behavior of tab