Bug fixing: The dismiss will never get called if you call the block before it