added boolean var to check if the component doubled div