fix bugs for path style under ms windows