Fixed small buf in parsing algorithm