Fixed exception in packet sending.