a bug fixed for has_child? method