fix bug of using gold head in labelling while there is no gold head in the test