Prevent double close