Fix infinite loop in windows due to path case