fix dispatching for routes with params