external templates now cache, but the close btn is not working