   attachLocationChangeListener: =>
     if @pushStateSupport
       @addListener window, "popstate", (event) =>
-        href = window.location.pathname
-        @log("Rendering onpopstate", href)
-        @renderUrl(href)
+        if @clickCount > 0
+          href = window.location.pathname
+          @log("Rendering popstate", href)
+          @renderUrl(href)
     else
       if @hashchangeSupport
         @addListener window, "hashchange", (event) =>
           if window.location.hash.substring(0, 2) == "#!"
             href = window.location.hash.substring(2)
-            if !@previous || href != @previous.path
-              @log("Rendering onhashchange", href)
-              @renderUrl(href)
+            @log("Rendering hashchange", href)
+            @renderUrl(href)
 
   renderInitialView: =>
     @log("Rendering initial page")

  # IE9 sets port to "443" even if protocol is https
  fixTargetPort: (port, protocol) =>
    protocolPorts =
      "http": "80"
      "https": "443"
    if port != "" && port == protocolPorts[protocol]
      ""
    else

      @renderInitialView()
    finally
      @init = false
      @initDone = true
  hashbangRouting: () =>
    @pushStateSupport = false
    if !@hashchangeSupport
      throw new Error("No hashchange support!")
    @transparentRouting()
  historyApiRouting: () =>
    @hashchangeSupport = false
    @transparentRouting()

  attachClickListener: =>
    if @pushStateSupport || @hashchangeSupport
      @addListener document, "click", (event) =>
        event = event || window.event
        target = event.target || event.srcElement
        if target
          @log("Checking if click event should be rendered")
          aTag = @findATag(target)
