fix selecting offset issue