fixed parsing offset bug