Solve "None Resource" bug #2251

I am not sure whether it's necessary to check for the existance of children.