Fixed cast of packetType in Connection.send.