offset bug fix