added rewrite flushing to CPT plugins