Fixes to support optimization issues with R-MKL