Hm, if you're doing the shift in getWeightMask, you shouldn't do it here too.