Fix index issue on Windows