fixed wrong context for querySelectorAll
first try at removeing empty nodes