         chrome.storage.sync.get PROJECT, (projects) ->
           if chrome.runtime.lastError? then callback? null; return
 
-          chrome.storage.sync.get INDEX, (index) ->
-            if chrome.runtime.lastError? then callback? null; return
-            if not (tickets[TICKET]? and index[INDEX]? and projects[PROJECT]?)
-              callback? null
-              return
-
-            tmp = []
-            for t in tickets[TICKET] when t?
-              url = index[INDEX][t[TICKET_URL_INDEX]]
-              tmp.push {
-                id:      t[TICKET_ID]
-                subject: t[TICKET_SUBJECT]
-                url:     url
-                project:
-                  id:    t[TICKET_PRJ_ID]
-                  name:  projects[PROJECT][url][t[TICKET_PRJ_ID]]
-                show:    t[TICKET_SHOW]
-              }
-
-            callback? tmp
+          if not (tickets[TICKET]? and projects[PROJECT]?)
+            callback? null
+            return
+
+          # console.log tickets[TICKET]
+          # console.log projects[PROJECT]
+
+          tmp = []
+          for t in tickets[TICKET]
+            for url, obj of projects[PROJECT] when obj.index is t[TICKET_URL_INDEX]
+              break
+            tmp.push {
+              id:      t[TICKET_ID]
+              subject: t[TICKET_SUBJECT]
+              url:     url
+              project:
+                id:    t[TICKET_PRJ_ID]
+                name:  projects[PROJECT][url][t[TICKET_PRJ_ID]]
+              show:    t[TICKET_SHOW]
+            }
+
+          callback? tmp
 
 
     ###

    ###
    sync: (callback) ->

      urlIndex = []
      projectObj = {}
      for t in tickets
        projectObj[t.url] = projectObj[t.url] or {}
        projectObj[t.url][t.project.id] = t.project.name
      for url, v of projectObj
        urlIndex.push url
      ticketArray = []
      for t in tickets
        for url, i in urlIndex when url is t.url then index = i
        ticketArray.push [t.id, t.subject, index, t.project.id, t.show]

      chrome.storage.sync.set PROJECT: projectObj
      chrome.storage.sync.set INDEX: urlIndex
      chrome.storage.sync.set TICKET: ticketArray, () ->
        if chrome.runtime.lastError?
          callback? false

  #     ticket = [ id, subject, project_url_index, project_id, show ]
  #
  #     project = {
  #       value of url:
  #         index: xxx
  #         value of id: name
  #     }
  #
  #


