Added packetbox test, fixed bugs.