another mistake implementing the popuptemplate