     else
       if @hashchangeSupport
         window.onhashchange = (event) =>
-          href = window.location.hash.substring(2)
-          @log("Rendering onhashchange", href)
-          @renderUrl(href)
+          if window.location.hash.substring(0, 2) == "#!"
+            href = window.location.hash.substring(2)
+            if href != @hashPreviousView
+              @log("Rendering onhashchange", href)
+              @renderUrl(href)
 
   renderInitialView: =>
     @log("Rendering initial page")

  pushStateSupport: history && history.pushState
  hashchangeSupport: "onhashchange" of window
  hashBaseUrl: false
  disableUrlUpdate: false
  fallbackRoute: false
  initPushState: () =>
    # check if current url needs to be changed pushState <-> hashbang
    @attachClickListener()
    @attachLocationChangeListener()
    @renderInitialView()

            event.preventDefault();
            @updateUrl(href)
        else
          if @exec(href)
            @log("Updating hash with", href)
            event.preventDefault();
            @hashPreviousView = href
            @updateUrl(href)

  attachLocationChangeListener: =>
