Ensure monitor is closed after task is resumed.