fixed empty dom elements being displayed