fix exception raised when solution reloads/closes or VS closes