fixed a cross platform bug