Better handling of the progress window