Added solution to last packet issue