Fix bug where empty packet caused End of Stream