fixing cross platform issues