fix selected bug