Fixed an offset bug.