Fixed a buf in data reading. The code now assures that all data