fix a bug of parent check