Fix encoding issue on Windows; fix iteration