Minor changes and fixes
Fixed MatLab hang issue after dialog boxes