fix error on random head