Fixed issue with dismiss button when not found in the template