Bug fix in dismiss pattern overlay on touch outside