Fixed redundant loop