replace directive fix