Fix, using wrong loop variable in interface detection