cross platform fixes