fixed empty packet bug