Fixed bug where Cast web app close is not detected, fixes #60