Fixed MATLAB incompatibilities