fix errors on new tab opening
Merge pull request #12 from srusskih/master

"TypeError" on new tab