Fix modal dismiss issue.
Merge pull request #380 from scrollback/unregister-client

Fix modal dismiss issue.