fix windows platform errors