correct bugs in mkl and compilation