fix for equals method when element id was 0