Fix limit offset bug