fix start offset bug