Fix ERROR_ACCESS_DENIED on windows #158