catches editor window exit