Updated to handle collisions for packet ids.