fixing sub-target names

fixing a bug in subtarget name resolution