fixes path variable for iteration