added onremoved listener check