prevent size 0 buffer warning