fixed memory access issue in MCLDA.cpp