Set separate var for infinite loop