     (document.location + "").replace(@getPath() + @getHash(), "")
     
   @change: ->
-    path = if @history then @getPath() else @getFragment()
+    path = if @getFragment() isnt "" then @getFragment() else @getPath()
     return if path is @path
     @path = path
     @matchRoute(@path)

    return if @path is path
    @path = path

    @matchRoute(@path, options) if options.trigger

    return if options.shim

      history.pushState(
        {}, 
        document.title, 
        @path
      )
    else
      window.location.hash = @path
    
  # Private
  
  @getPath: -> if window.location.pathname.substr(0,1) is '/' then window.location.pathname else '/' + window.location.pathname
  
  @getHash: -> window.location.hash
  
