fix selected behavior