Fixed each_with_index var order