Fixing bug in tabs.js