only turn rewrite on once