Fixing matlab dlg.

1. Stop online draw anyway.
2. Enable offline draw.