Fix bug when tailblocksize==(0 or normalblocksize)