More changes to packet functions