Prevent double close.