             trash_aux_button.icon_spin(true, disable=true)
             log_output = @log.find("textarea")
             log_output.text('')
+            # now we actually delete the files and report any errors in the log
             @preview.pdflatex.trash_aux_files (err, log) =>
-                trash_aux_button.icon_spin(false, disable=true)
                 if err
                     log_output.text(err)
                 else
                     log_output.text(log)
+                # after deleting the log also clear all issues!
+                @preview.pdflatex.last_latex_log = ''
+                @render_error_page()
+                trash_aux_button.icon_spin(false, disable=true)
             return false
 
         run_sage = @element.find('a[href="#latex-sage"]')

            @log.find("textarea").text("Running Latex...")
            run_latex.icon_spin(true, disable=true)
            @preview.pdflatex._run_latex @load_conf_doc().latex_command, (err, log) =>
                run_latex.icon_spin(false, disable=true)
                @log.find("textarea").text(log)
            return false

        run_recompile = @element.find('a[href="#latex-recompile"]')


    update_preview: (cb, force=false) =>
        if not @_render_preview
            cb?()
            return

        # no content available, hence nothing to preview
        if not @latex_editor.syncdoc._fully_loaded
            cb?()
            return

