fixed url rewriting