Fixed error causing overflows in setKey. Tested all 3 size cases.