Added a try catch block to response packets to detect invalid packet data.