     router = {}
     filters = {before:[], after:[]}
     routeMethods.forEach (method) ->
-      routes[method] = []
+
+      if not _.isArray(routes[method]) 
+        routes[method] = []
+
       router[method] = (route, callback) ->
         if typeof route != "string"
           callback = route

  for i in [0...routes[method].length]
    obj = routes[method][i]
    matches = url.match obj.regex

    if matches

      new LiveView "/views" + url + ".html", {}, (view) -> 

  params = state.params || {}
  Router[method](document.location.pathname, params) 

routes = {}
routeMethods = ["get", "post", "put", "delete"]

