Script bug fixes. Rolled Magento2 back to dev40