moved rewrite flushing to admin_init instead of init