corrected few issues related to call to matlabpool