Fixed breaking tabs when clicking outside tab area

- issue #3