Fix heap corruption after packet queue overflow