Fixed the issue with the GUI not being properly updated when closing all the files (closes #285).