matlab fixes
Merge branch 'ml_fixes'