Fixed a bug when executing MATLAB