fix offset bug in touch pad