Fix for loop for convert