fix problem of size calculation in bin type, and add 'btail' api