     } temp_storage;
 
     // Keys and values for the block
-    UnsignedBits    keys[ITEMS_PER_THREAD];
+    KeyT            keys[ITEMS_PER_THREAD];
     ValueT          values[ITEMS_PER_THREAD];
 
     // Assign default (min/max) value to all keys


    // BlockLoad type (keys)
    typedef BlockLoad<
        UnsignedBits*,
        BLOCK_THREADS,
        ITEMS_PER_THREAD,
        AgentRadixSortDownsweepPolicy::LOAD_ALGORITHM> BlockLoadKeys;

    typedef typename Traits<KeyT>::UnsignedBits UnsignedBits;

    // Min and max key value
    const KeyT MIN_KEY = (KeyT) Traits<KeyT>::MIN_KEY;
    const KeyT MAX_KEY = (KeyT) Traits<KeyT>::MAX_KEY;

    // Constants
    enum
