fixes npe exceptions related with stabilizer run

forward port of #3970
and has some extra fixes related with tck