Correct the implementation of AMKL