offset bug fixed