Fix behaviour on windows