Fix firefox bug by clearing images and videos