Fixed url rewriting issue