Fix weight conversion error for values