resolve typo (next -> next if)