Fixed compile error at some platforms