fixed javascript tab history