Fix error with big aks inputs (order would roll over)