fix bug and add mito ATA encode support