fix compile error on master/3.0 branch