fix image folder iteration