Fixed incorrect assignemnt between GrayCode and unsigned type.