Fixes for #471

With these fixes, the ad starts playing, but freezes with an uncaught exception at a later point