fixed async-video bug when firefox looses focus and a crash when shutting down