improve compatibility on windows