Eliminating emply elements from HAS template