attributeerror_fix

A correction to an error occurring right after closing a window displayed when simulation is finished.