Fix buffer bug when init blocks from an existing file.