fixed if statmenet for id comparaison