fix cross platform bug