fixed a bug with filesie = MAX_PACKET_SIZE