fix assertion functions; expect 3 nodes

query nodes are seemingly not being garbage collected