fixed incomplete bufferread bug