Fix an offset bug