Fixed adata encoding bug.