removes data when element is unselected