Fixing changing of active tab