Fix compile time error for WF API