you need to add dependson instanceidprofileservicefactory  somewhere here  otherwise instanceidprofileservice might get destroyed before pss does and you will be left with instanceid pointers pointing to nothing 