Fix compile warning (#4311)