Fixed matlab incompatibilities