use queryselector to fix some bugs