Solved key casting issue