For-inside-if fixed