       if not projects? or projects.length is 0 then return
       for p in projects
         @_data[projects[0].url].projects.remove((n) -> return n.equals(p))
-      for a in @_filteredData when a.url is projects[0].url
+      for a in @_filteredData when a.projects and a.url is projects[0].url
         a.projects.remove((n) -> return n.equals(p))
 
     ###*


    ###*
    # all data.
    # @param {DataModel}  data's url
    ###
    _data: {}

    # filtered data.
    _filteredData: []
    @property 'accounts',
      get: -> @_filteredData

    ###
    addProjects: (projects) ->
      if not projects? or projects.length is 0 then return
      @removeProjects(projects)
      @_data[projects[0].url].projects.add(projects)
      for a in @_filteredData when a.url is projects[0].url
        a.projects = a.projects or []
        a.projects.add(projects)
      if not @selectedProject then @selectedProject = projects[0]

    ###*
    # remove project from account.
