Fix url rewrite