fix cast unsigned integer
fixes