Fixed some problems with the packet system.