remove selected class when hidden