fixed rewrite on activation