popup directive template fix