fixing some platform issues