Improved packet handling.