Tiny fixes on AD sorting
Tiny fix
Several fixes
Tiny fix