fix empty packet bug