Add modal close after duration.