Synched changes for #214 with ml.bat