cross platform compatibility fix