Added some more debug messages. Program crashes at packet number 13.