use same function to check if node is active than in adaptChildren