fix a bug when get the sub