fix services rewrite