Updated logic of getting of id for carousel binding