fix waf upgrade