Fixed output window hijacking and HTML image preview