Changed GetIdElement method