Fix an unsigned cast madness.