clean children because they might contain a null node