Encode correct headers when asking for very small output bytes and using long frames