updating onClose to set BlockingVariables rather than incrementing a counter