fixed a border case of having a child without a class