Fix HTML5 disappearing object bug