chromecast: fixing some bugs with the demo code