fix for the number of weighted references exceeding 8 in HM weight analysis
slicetype: fix for gcc warnings
Merge with stable