fix bug with merging of AKAs
Update tests