Implemented lastPacket properly