Handle invalid packets better.